package com.softserveinc.edu.oms.persistence.dao.concrete;

import java.util.List;

import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;

import com.softserveinc.edu.oms.persistence.dao.HibernateDao;
import com.softserveinc.edu.oms.persistence.entities.Region;

public class RegionDao extends HibernateDao<Region> {

	public RegionDao(final SessionFactory sessionFactory) {
		super(Region.class, sessionFactory);
	}

	public List<Region> findRegionByName(final String regionName) {
		return findByCriterions(Restrictions.like("regionName", regionName
				+ "%"));
	}
}
